/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package ejemplojavafx;

import java.io.IOException;
import java.net.URL;
import java.util.ResourceBundle;
import java.util.logging.Level;
import java.util.logging.Logger;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.fxml.Initializable;
import javafx.scene.Parent;
import javafx.scene.layout.AnchorPane;

/**
 *
 * @author snake_gt
 */
public class FXMLDocumentController implements Initializable {
    
    @FXML
    private AnchorPane ventana;
    
    
    @FXML
    public void ventanaListaProductos(){
        
        try {
            Parent root = FXMLLoader.load(getClass().getResource("ListarProducto.fxml"));
            ventana.getScene().setRoot(root);
        } catch (IOException ex) {
            System.out.println("Error al cargar la ventana");
        }
        
    }
    
    @Override
    public void initialize(URL url, ResourceBundle rb) {
        // TODO
    }    
    
}
